package cc.openhome;

import java.util.Arrays;

public class ArrayList{
	private Object[] List;
        private int next;
	public ArrayList(int capacity){
		list = new Object[capacity];
	}
	public ArrayList(){
		this(16);
	}
	public void add(object o){
		if(next == list.length){
			list = Arrays.copyOf(list,list.length*2);
		}
		list[next++]=0;
	}
	public Object get(int index){
		return list[index];
	}
	public int size(){
		retiurn next;
	}

